package com.yao.securitydemo.model;

import lombok.Data;

/**
 * @author tututu
 * @description
 * @date 2022/4/26 21:46
 */
@Data
public class Result {
    private Integer code;
    private String msg;

    public static Result ok(){
        Result r  = new Result();
        r.setCode(0);
        r.setMsg("success");
        return r;
    }

    public static Result ok(String msg){
        Result r  = new Result();
        r.setCode(0);
        r.setMsg(msg);
        return r;
    }

    public static Result error(Integer code,String msg){
        Result r  = new Result();
        r.setCode(code);
        r.setMsg(msg);
        return r;
    }
}
